<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>列表</title>
    <link href="/resource/bootstrap4/css/bootstrap.css" rel="stylesheet">
    <script type="text/javascript" src="/resource/js/jquery-3.2.1.js"></script>
    <script src="/resource/bootstrap-treeview/js/bootstrap-treeview.js"></script>
    <script src="/resource/bootstrap4/js/bootstrap.js"></script>
    <link rel="stylesheet" href="/resource/css/index3.css">
</head>
<body>
<form method="post" action="/list">
    <a href="/add"><input type="button" value="添加"></a>
    <table>
        <tr>
            <td>ID</td>
            <td>ganem</td>
            <td>上架时间</td>
            <td>修改时间</td>
            <td>Cname</td>
            <td>操作</td>
        </tr>
        <c:forEach var="e" items="${pg.list}">
            <tr>
                <td>${e.gid}</td>
                <td>${e.gname}</td>
                <td><fmt:formatDate value="${e.createTime}"></fmt:formatDate> </td>
                <td><fmt:formatDate value="${e.updateTime}"></fmt:formatDate> </td>
                <td>${e.cname}</td>
                <td><a href="/update?id=${e.gid}"><input type="button" value="修改"></a></td>
            </tr>
        </c:forEach>
        <tr>
            <td colspan="100">
                <jsp:include page="/resource/common/page2.jsp"></jsp:include>
            </td>
        </tr>
    </table>
</form>
</body>
</html>
